package com.far.permisions.meta.groovy;

import com.far.permisions.tools.GroovyScriptTools;
import com.far.permissions.rule.RuleValueConvertor;
import com.far.permissions.enums.Type;

public class GroovyValueConvertor implements RuleValueConvertor {

    @Override
    public Object convert(Object functionCode) throws Exception {
        String script = findScript((String) functionCode);
        return GroovyScriptTools.invoke(script);
    }

    @Override
    public String getType() {
        return Type.GROOVY.name();
    }

    private String findScript(String scriptCode) {
        return "";
    }
}
